<template>
    <div>
        <div class="news-center">
            <h1>新闻中心</h1>
            <h2>New Center</h2>
        </div>
        <common-news :list="newsList"></common-news>
        <div class="news-button-wrap">
            <div class="news-button">
                <a href="/news">更多新闻 ></a>
            </div>
        </div>
    </div>
</template>
<script setup>
import { ref } from 'vue'
import CommonNews from '@/components/CommonNews.vue'

// TODO 从接口中获取
const newsList = ref([
    {
        title: 'E7E16|菲斯生物邀您共聚CPHI & PMEC China 2024',
        date: '2024-06-19',
        articleId: 1,
    },
    {
        title: '浅谈药物杂质标准品定量研究方法之定量核磁',
        date: '2024-06-07',
        articleId: 2,
    },
    {
        title: '6月SINCO最新入库杂质对照品，现货等您来选！',
        date: '2024-06-05',
        articleId: 3,
    },
])
</script>
<style lang="scss" scoped>
.news-center {
    h1 {
        text-align: center;
        color: #09a4c3;
        font-size: 28px;
    }

    h2 {
        text-align: center;
        color: #999;
        font-size: 14px;
    }
}

.news-button-wrap {
    width: 150px;
    margin: 40px auto;
}
.news-button {
    width: 150px;
    height: 44px;
    line-height: 42px;
    text-align: center;
    border: 1px solid rgba(9, 174, 212, 1);
    a {
        color: #09aed4;
        text-decoration: none;
    }
    &:hover {
        background-color: rgba(9, 164, 195, 1);
        border-color: transparent;
        a {
            font-weight: bold;
            color: #fff;
        }
    }
}
</style>
